package models

import "data-system/common"

func Ok() (int, any) {
	return 200, map[string]any{"code": common.Success, "message": "成功"}
}

func OkData(data any) (int, map[string]interface{}) {
	return 200, map[string]interface{}{"code": common.Success, "message": "成功", "data": data}
}

func Fail(code int, message string) (int, map[string]interface{}) {
	return 400, map[string]any{"code": code, "message": message}
}

func FailData(data any) (int, map[string]interface{}) {
	return 400, map[string]any{"code": common.Error, "message": "失败", "data": data}
}
